package com.ruoyi.emergency.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //添加
import com.ruoyi.emergency.service.IEmergencyOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.emergency.mapper.EmergencyOrgMapper;
import com.ruoyi.emergency.domain.EmergencyOrg;

/**
 * 应急救援机构Service业务层处理
 * 
 * @author hcc
 * @date 2024-11-17
 */
@Service
public class EmergencyOrgServiceImpl extends ServiceImpl<EmergencyOrgMapper, EmergencyOrg> implements IEmergencyOrgService //修改
{
    @Autowired
    private EmergencyOrgMapper emergencyOrgMapper;

    /**
     * 查询应急救援机构
     * 
     * @param id 应急救援机构主键
     * @return 应急救援机构
     */
    @Override
    public EmergencyOrg selectEmergencyOrgById(Long id)
    {
        return emergencyOrgMapper.selectEmergencyOrgById(id);
    }

    /**
     * 查询应急救援机构列表
     * 
     * @param emergencyOrg 应急救援机构
     * @return 应急救援机构
     */
    @Override
    public List<EmergencyOrg> selectEmergencyOrgList(EmergencyOrg emergencyOrg)
    {
        return emergencyOrgMapper.selectEmergencyOrgList(emergencyOrg);
    }

    /**
     * 新增应急救援机构
     * 
     * @param emergencyOrg 应急救援机构
     * @return 结果
     */
    @Override
    public int insertEmergencyOrg(EmergencyOrg emergencyOrg)
    {
        return emergencyOrgMapper.insertEmergencyOrg(emergencyOrg);
    }

    /**
     * 修改应急救援机构
     * 
     * @param emergencyOrg 应急救援机构
     * @return 结果
     */
    @Override
    public int updateEmergencyOrg(EmergencyOrg emergencyOrg)
    {
        return emergencyOrgMapper.updateEmergencyOrg(emergencyOrg);
    }

    /**
     * 批量删除应急救援机构
     * 
     * @param ids 需要删除的应急救援机构主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyOrgByIds(Long[] ids)
    {
        return emergencyOrgMapper.deleteEmergencyOrgByIds(ids);
    }

    /**
     * 删除应急救援机构信息
     * 
     * @param id 应急救援机构主键
     * @return 结果
     */
    @Override
    public int deleteEmergencyOrgById(Long id)
    {
        return emergencyOrgMapper.deleteEmergencyOrgById(id);
    }
}
